import BusinessIndex from '@/components/business/index.vue'
import BusinessLogin from '@/components/business/login.vue'
import BusinessRegister from '@/components/business/register.vue'
import BusinessProfile from '@/components/business/profile.vue'
import BusinessEmail from '@/components/business/email.vue'
import BusinessPay from '@/components/business/pay.vue'
import BusinessConfirm from '@/components/business/confirm.vue'

//定义一个路由列表(子路由)
const list = [
    {
        name: 'BusinessConfirm',
        //生成路由地址：/business/confirm
        path: 'confirm',  
        component: BusinessConfirm,
        //登录状态验证
        meta:{login:true}
    },
    {
        name: 'BusinessPay',
        //生成路由地址：/business/pay
        path: 'pay',  
        component: BusinessPay,
        //登录状态验证
        meta:{login:true}
    },
    {
        name: 'BusinessEmail',
        //生成路由地址：/business/email
        path: 'email',  
        component: BusinessEmail,
        //登录状态验证
        meta:{login:true}
    },
    {
        name: 'BusinessProfile',
        //生成路由地址：/business/profile
        path: 'profile',  
        component: BusinessProfile,
        //登录状态验证
        meta:{login:true}        
    },
    {
        name: 'BusinessIndex',
        //生成路由地址：/business/index
        path: 'index',  
        component: BusinessIndex,
        //登录状态验证
        meta:{login:true}        
    },
    {
        name: 'BusinessLogin',
        //生成路由地址：/business/login
        path: 'login',  
        component: BusinessLogin,        
    },
    {
        name: 'BusinessRegister',
        //生成路由地址：/business/register
        path: 'register',  
        component: BusinessRegister,        
    },
]

//父级的组件模板
const layout = {
    template: `<router-view></router-view>`
}

export default [
    {
        name: 'business',
        path: '/business',
        component: layout,
        children: list
    }
]